package com.itheima.pojo;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

import java.io.Serializable;

/**
 * 封装查询条件
 */
@Data
public class QueryPageBean implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer currentPage = 1;// 默认页码:1

    private Integer pageSize = 10;// 默认每页记录数:10

    private String queryString;//查询条件

    public <T> Page<T> getPage() {

        return new Page<>(currentPage, pageSize);
    }

    public QueryPageBean() {
    }

    public QueryPageBean(Integer currentPage, Integer pageSize, String queryString) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.queryString = queryString;
    }

}